#ifndef _REQUEST_BATCH_HPP
#define _REQUEST_BATCH_HPP 1

#include <boost/shared_ptr.hpp>
#include <iostream>
#include "RequestCore.hpp"

namespace BFT
{
  namespace order
  {
    namespace messages
    {
      class RequestBatch
      {
      public:
				
	RequestBatch(boost::shared_ptr<std::vector<boost::shared_ptr<BFT::messages::RequestCore> > > _entries);
				
	RequestBatch(boost::shared_ptr<char> _bytes, int _bytes_size, int _count);

	boost::shared_ptr<std::vector<boost::shared_ptr<BFT::messages::RequestCore> > > getEntries(); //inlined
				
	int getSize();
				
	boost::shared_ptr<char> getBytes(); 
				
	boost::shared_ptr<char> getBytes(int& _size);
				
	bool equals(boost::shared_ptr<RequestBatch> _rb);
				
	void printInfo();
				
      protected:
				
	boost::shared_ptr<std::vector<boost::shared_ptr<BFT::messages::RequestCore> > > entries;
				
	int bytes_size;
	boost::shared_ptr<char> bytes;
			
      };
			
      inline boost::shared_ptr<std::vector<boost::shared_ptr<BFT::messages::RequestCore> > > RequestBatch::getEntries() {return entries;}
    }
  }
}

#endif
